Page({
  onLoad({ id }) {
    this.getHouseDetail(id)

  },
  // 获取详情
  async getHouseDetail(id) {
    if(!id) return
    const { code, data: detail } = await wx.http.get('/room/' + id)
    if (code !== 10000) return wx.utils.toast()
    this.setData({detail})

  },
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index',
    })
  },
})
